﻿
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/

CKEDITOR.plugins.add("album",
{
    //requires: "dialog",
    init: function (editor) {
        //var b = editor.addCommand("InsertAlbum", new CKEDITOR.dialogCommand("InsertAlbum"));
        if (editor.addMenuItems)
            editor.addMenuItem("album", {
                label: 'Them album',
                icon: this.path + 'dialogs/icon/album.png',
                command: 'InsertAlbum',
                group: 'clipboard'
            });
        if (editor.contextMenu)
            editor.contextMenu.addListener(function () {
                return { "album": CKEDITOR.TRISTATE_OFF };
            });
//        editor.addCommand("InsertAlbum", new CKEDITOR.dialogCommand("InsertAlbum"));
//        editor.ui.addButton("InsertAlbum", { label: 'Thêm album', command: "InsertAlbum", toolbar: "album", icon: this.path + "dialogs/icon/album.png" });
//        CKEDITOR.dialog.add("InsertAlbum", this.path + "dialogs/album.js")

        editor.addCommand('InsertAlbum',
		{
		    exec: function (editor) {
		        InsertImageContent();
		    }
		});
        editor.ui.addButton('Uploadimage',
		{
		    label: 'Đính kèm ảnh',
		    command: 'InsertAlbum',
		    icon: this.path + 'dialogs/icon/album.png'
		});

    }

});


